﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Windows.Forms.Design;

namespace StableDiffusionTools.Controls
{
    [ToolStripItemDesignerAvailability(ToolStripItemDesignerAvailability.ToolStrip | ToolStripItemDesignerAvailability.StatusStrip)]
    public class ToolStripProgressBarEx : ToolStripControlHost
    {
        [Description("Test text displayed in the textbox"), Category("Data")]
        public ProgressStatusBar ProgressBar
        { get => Control as ProgressStatusBar; }
        [Description("Test text displayed in the textbox"), Category("Appearance")]
        public Color FontColor
        { get => ProgressBar.FontColor; set => ProgressBar.FontColor = value; }
        [Description("Test text displayed in the textbox"), Category("Appearance")]
        public string DisplayValue
        { get => ProgressBar.DisplayValue; set => ProgressBar.DisplayValue = value; }
        [Description("Test text displayed in the textbox"), Category("Data")]
        public int Value
        { get => ProgressBar.Value; set => ProgressBar.Value = value; }

        public ToolStripProgressBarEx() : base(new ProgressStatusBar()) { }

        protected override void OnSubscribeControlEvents(Control control)
        => base.OnSubscribeControlEvents(control);//TODO: Subscribe to hosted control events
        protected override void OnUnsubscribeControlEvents(Control control)
        => base.OnUnsubscribeControlEvents(control);//TODO: Unsubscribe to hosted control events
    }
}
